-
Notifications
You must be signed in to change notification settings - Fork 13.7k
compiler: Add Windows resources to rustc-main and rustc_driver #146018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in compiler/rustc_codegen_ssa |
This comment was marked as outdated.
This comment was marked as outdated.
Why is the rustc version included in the product name? At most including the release channel would make sense to me (given that nightly genuinely behaves differently from stable by allowing unstable features), but the exaxt version is duplicated with the product version field. |
This comment has been minimized.
This comment has been minimized.
I don't have a good justification for the first iteration of this PR. Happy to update the names/descriptions to whatever makes the most sense |
92170d4
to
6886e5b
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
4cdb255
to
a21db62
Compare
Updated the Product Description to be just "Rust Compiler" or "Rust Compiler (channel)" for non-stable |
This comment has been minimized.
This comment has been minimized.
This needs someone who actually have some clues about windows resources to review... I'll ask about a reviewer |
This comment has been minimized.
This comment has been minimized.
I'm not familiar with Windows resources. But can you say more on the motivation for this change? EDIT: okay I found #t-compiler/windows > version resources on rustc.exe and rustc_driver.dll, but it's still not super obvious to me the motivation for the change. |
In many ways this is a cosmetic change: as you can see in the screenshot in the comment above, Windows shows the version info in the file explorer when you right click on the .exe or .dll and look at the details However this info is also used by some other tools on Windows such as debuggers or crash reporters when collecting diagnostic information. For our internal builds of Rust at Microsoft having version info available would allow us to collect better automated crash reports from our users. |
Ok thanks for the clarification, that makes sense. I'll ask internally for another reviewer who has at least slightly more clues about this than I do. |
|
I know, it's just not a priority for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm can you squash your commits together and force push?
Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll Sets the product description to "Rust Compiler" or "Rust Compiler (channel)" for non-stable channels
5e579f4
to
095fa86
Compare
@wesleywiser done |
@bors r+ |
…esleywiser compiler: Add Windows resources to rustc-main and rustc_driver Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll Invokes `rc.exe` directly, rather than using one of the crates from the ecosystem to avoid adding dependencies. A new internal `rustc_windows_rc` crate has the common build script machinery for locating `rc.exe` and constructing the resource script
Rollup of 11 pull requests Successful merges: - #145177 (std: move `thread` into `sys`) - #146018 (compiler: Add Windows resources to rustc-main and rustc_driver) - #146025 (compiler: Include span of too huge array with `-Cdebuginfo=2`) - #146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit) - #146195 (fix partial urlencoded link support) - #146300 (Implement `Sum` and `Product` for `f16` and `f128`.) - #146314 (mark `format_args_nl!` as `#[doc(hidden)]`) - #146324 (const-eval: disable pointer fragment support) - #146326 (simplify the declaration of the legacy integer modules (`std::u32` etc.)) - #146339 (Update books) - #146343 (Weakly export `platform_version` symbols) r? `@ghost` `@rustbot` modify labels: rollup
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing e9b6085 (parent) -> fefce3c (this PR) Test differencesShow 4 test diffs4 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard fefce3cecd63cebf2d7c9aa3dd90a84379fcfa1a --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (fefce3c): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary 0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 466.867s -> 467.971s (0.24%) |
Hardcoding rc.exe instead of allowing llvm-rc or some other res-writing crate prevents cross-building rustc-for-Windows on non-Windows hosts, no? |
Yeah this is also a problem for builds of Fuchsia's toolchains. Is there some way we can specify the path to the build directly? Maybe via the config.toml? Or an environment variable? |
Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll
Invokes
rc.exe
directly, rather than using one of the crates from the ecosystem to avoid adding dependencies.A new internal
rustc_windows_rc
crate has the common build script machinery for locatingrc.exe
and constructing the resource script